void PigMain ( List &args ) {	
 int a;
 while (true) {
 bool a = job_thread_pool->HasJobsRunning();
 bool b = send_thread_pool->HasJobsRunning();
 bool c = get_thread_pool->HasJobsRunning();
 if (!(a || b || c)) break;
 sleep(1);
 }
}